package com.googlecode.simplexer.validator.implementation;

import com.googlecode.simplexer.validator.*;

/**
 * A verifier focus on verifying the inputed source only contains alpha and
 * numeric.
 * 
 * @author zhisen.huang
 * @see AlphaVerifier
 * @see NumericVerifer
 * @see SpaceVerifier
 */
public class AlphaNumericVerifier extends CompositeVerifier {

	public boolean validate(char chr) throws UnsupportedOperationException {
		// why '@'? it stands for that the identifier is an interface type but
		// not else.
		return VerifyHub.ALPHA.validate(chr) || VerifyHub.NUMERIC.validate(chr)
				|| chr == '.' || chr == '_' || chr == '@';
	}

}
